<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

class Homepage extends Controller {

	/*
	*	constructor
	*	@PARA: null
	*	@RETURN: null
	*/
	public function Homepage()
	{
		parent::Controller();	
	}

	/*
	*	index page - defult class action
	*	@PARA: null
	*	@RETURN: null
	*/
	public function index()
	{	
		$data = array();
		
		//get menu
		$this->load->model('menus_model', 'menusModel');
		$menuData = $this->menusModel->getMenuData();		
		$data['menuView'] = $this->load->view('homepage/category_menus', $menuData, true);		
		
		
		//get proudct
		$this->load->model('games_model', 'gamesModel');
		$productData['gamesList'] = $this->gamesModel->getGamesList();

		$data['productionView'] = $this->load->view('games/list_games', $productData, true);
		
		
		$this->load->library('layout');
		$this->layout->render_page('homepage/main_page', $data);		
	}
}
?>